<div class="flickr-photos">
<?php echo $before_title . $options['title'] . $after_title; ?>
<?php
$baseurl = get_option('silas_flickr_baseurl');
$linkoptions = get_option('silas_flickr_linkoptions');

//don't need to resolve absolutely, since we're not in a post
//$parts = parse_url(get_bloginfo('home'));
//$home = 'http://'.$parts['host'];

if (is_array($photos)) foreach($photos as $photo):
if ($linkoptions == 'flickr') {
    $photoURL = $photo['info']['urls']['url'][0]['_value'];
} else {
    if ($SilasFlickrPlugin->config['useLightbox']) {
        $photoURL = $photo['sizes']['Medium']['source'];
    } else {
        $photoURL = $baseurl.'photo/'.$photo['id'].'/'.$photo['pagename'];
    }
}
?>
<a href="<?echo $photoURL ?>" <?php echo ($SilasFlickrPlugin->config['useLightbox'] ? 'rel="lightbox[photos]"' : '');?>><img src="<?php echo $photo['sizes']['Square']['source']?>" width="<?php echo $photo['sizes']['Square']['width']?>" height="<?php echo $photo['sizes']['Square']['height']?>" alt="<?php echo htmlentities($photo['title'])?>" /></a>
<?php endforeach;?>

<?php if ($linkoptions != 'flickr'): ?>
<br /><a href="<?php echo $baseurl?>" class="more-photos">View more photos &gt;</a>
<?php endif; ?>
</div>
